package com.headfirst.BehaviorMode.command.simpleremote;

/**
 * 遥控器类(调用者)
 *
 */
public class SimpleRemoteControl {

    // 有一个插槽持有命令
    Command slot; 
    
    public SimpleRemoteControl(){}
    
    public void setCommand(Command command){
        slot = command;
    }
    
    public void buttonWasPressed(){
        slot.execute();
    }
}
